package com.bh.service.impl;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.bh.domain.Role;
import com.bh.mapper.RoleMapper;
import com.bh.service.RoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Collection;
import java.util.List;
import java.util.Map;
import java.util.function.Function;

/**
 * @author13007
 * @date2022/10/25
 * @apiNote
 */
@Service
public class RoleServiceImpl implements RoleService {

    @Autowired
     private RoleMapper RoleMapper;

    /**
     * 查询【查询所有数据】
     *
     */

    @Override
    public Role selectRoleById(Long id) {
        return RoleMapper.selectRoleById(id);
    }
    /**
     * 分页
     *
     */
    @Override
    public List<Role> selectRoleList(Role role) {
        return RoleMapper.selectRoleList(role);
    }

    /**
     * 新增角色
     *
     */
    @Override
    public int insertRole(Role role) {
       return RoleMapper.insertRole(role);
    }
    /**
     * 修改角色
     *
     */
    @Override
    public int updateRole(Role role) {
        return RoleMapper.updateRole(role);
    }
    /**
     * 删除角色
     *
     */

    @Override
    public int deleteRoleById(Long id) {
        return RoleMapper.deleteRoleById(id);
    }














}
